<template>
  <el-row>
    <el-col :span="22">预约项目</el-col>
    <el-divider content-position="center"></el-divider>
    <data-table
      :value="fromdata"
      :total-count="fromdata.length"
      :has-action="false"
      :table-column-attributes="tableColumnAttributes"
      :localPage="true"
    >
    </data-table>
  </el-row>
</template>

<script>
import baseMixin from '@/mixins/base'

export default {
  name: 'carInfo',
  components: {},
  props: {
    fromdata: {
      type: Array,
      default: () => { return [] }
    }
  },
  mixins: [
    baseMixin({
      format (res) {
        return res.map(data => {
          return data
        })
      }
    })
  ],
  data () {
    return {
      tableColumnAttributes: [
        { name: '项目名', value: 'projectName', type: 'text' },
        { name: '项目工时', value: 'workHours', type: 'text' },
        { name: '项目类型', value: 'projectType', type: 'text' },
        { name: '工时费', value: 'amount', type: 'text' },
        { name: '折扣', value: 'discount', type: 'text' },
        { name: '折后金额', value: 'discountAmount', type: 'text' },
        { name: '项目提成点', value: 'commission', type: 'text' },
      ],
      rules: [],
    }
  },
  async created () {
    // const { data } = await getCustomerById(id)
    // this.customerInfo = data
  },
  methods: {
    changeType (item) {
      this.selectedTypeText = item.label;
    },
  },
  mounted () {
  }
}
</script>

<style lang="scss" scoped>
.el-table .delete-row {
  background: #f5f7fa;
  color: #ccc !important;
}
.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.avatar-uploader .el-upload:hover {
  border-color: #409eff;
}
.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 178px;
  height: 178px;
  line-height: 178px;
  text-align: center;
}
.avatar {
  width: 80px;
  height: 80px;
  display: block;
}
</style>
